<template>
    <div class="goodsdesc-container">
        <h3>{{ info.goods_name }}</h3>
        <a href="http://ssss.fjncjy.com/h5/#/good/details?storeId=14&goodsId=53829">H5页面</a>

        <hr>

        <div class="content" v-text="info.shareDescription"></div>
    </div>
</template>

<script type="text/ecmascript-6">

    import { Toast } from 'mint-ui'

    export default {
        name: 'GoodsDesc',
        data() {
            return {
                storeId: this.$route.params.storeId,
                goodsId: this.$route.params.goodsId,
                info:{} //图文介绍
            }
        },
        created() {
            this.getGoodsDesc();
        },
        methods: {
            getGoodsDesc() {
                var pushData = {
                    goods_id: this.goodsId,
                    area_id: '',
                    store_id: this.storeId,
                    pp_id: '',
                }

                this.$http.post('mobile/index.php?act=goods&op=goods_detail',pushData).then(result => {
                    if (result.body.code == 200) {

                        console.log('详情:')
                        console.log(result)

                        this.info = result.body.datas.goods_info;

                        Toast('获取详情成功!')

                    } else {

                        Toast('获取详情失败!')
                    }
                })
            }
        }
    }
</script>


<style lang="scss" rel="stylesheet/scss" scoped>

    .goodsdesc-container {
        padding: 4px;

        h3 {
            font-size: 16px;
            color: #226aff;
            text-align: center;
            margin: 15px 0;
        }

        .content {
            img {
                width: 100%;
            }
        }
    }

</style>